<template>
  <div class="fllow-item">
    <div class="fllow-info">
      <img class="avator" :src="followData.avatar" alt="">
      <div class="base-info">
        <div class="info">
          <span class="name">{{followData.nickname}}</span>
          <span class="time">截止:{{followData.end_time}}</span>
        </div>
        <div class="tags">
          <img class="icons" v-if="followData.lottery_type==2" src="../assets/imgs/home/icon-hot2@2x.png" alt="">
          <img class="icons" v-else src="../assets/imgs/home/icon-hot1@2x.png" alt="">
          <!-- <span class="orange">2串1</span>
          <span class="red">近5中5</span>
          <span class="blue">命中:95%</span> -->
          <div class="modelist" v-if="followData.mode_list">
            <span class="orange" v-if="followData.mode_list[0]">{{followData.mode_list[0]}}</span>
            <span class="red" v-if="followData.mode_list[1]">{{followData.mode_list[1]}}</span>
            <span class="blue" v-if="followData.mode_list[2]">{{followData.mode_list[2]}}</span>
          </div>
        </div>
        <div class="desc" v-if="followData.desc">{{followData.desc}}</div>
        <div class="desc" v-else>百中百发，快来和我一起赚钱吧！</div>
      </div>
    </div>
    <ul class="fllow-detail">
      <li>自购 <span>¥ {{followData.total_price}}</span></li>
      <li>起跟 <span>¥ {{followData.min_price}}</span></li>
      <li>人数 <span>{{followData.bill_total_num}}</span></li>
      <li>总额 <span>¥ {{followData.bill_total_price}}</span></li>
      <!-- <li><span class="fllow-btn" @click="$router.push({ path: `/follow/detail/${1}` })">跟单</span></li> -->
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    followData: {
      type: Object,
      default: () => {}
    }
  }
}
</script>
<style lang="less" scoped>
  .fllow-item {
    margin-top: 0.2rem;
    background: #ffffff;
    .fllow-info {
      display: flex;
      padding: 0.2rem;
      .avator {
        width: 0.8rem;
        height: 0.8rem;
        margin-right: 0.1rem;
        border-radius: 50%;
      }
      .base-info {
        flex: 1;
        overflow: hidden;
        .info {
          height: 0.36rem;
          line-height: 0.36rem;
          .name {
            font-size: 0.26rem;
            color: #333333;
          }
          .time {
            float: right;
            min-width: 1.8rem;
            font-size: 0.22rem;
            color: #999999;
          }
        }
        .tags {
          margin-top: 0.1rem;
          .icons {
            // margin-right: 0.1rem;
            width: 0.3rem;
            height: 0.3rem;
            border-radius: 50%;
          }
          .modelist {
            display: inline-block;
          }
          span {
            padding: 0 0.1rem;
            margin-left: 0.06rem;
            height: 0.3rem;
            line-height: 0.3rem;
            font-size: 0.22rem;
            border-width: 0.01rem;
            border-style: solid;
            border-radius: 0.06rem;
          }
          .orange {
            color: #F5A623;
            border-color: #F5A623;
          }
          .red {
            color: #D44743 ;
            border-color: #D44743 ;
          }
          .blue {
            color: #3F8FEB;
            border-color: #3F8FEB;
          }
        }
        .desc {
          margin-top: 0.24rem;
          line-height: 0.36rem;
          font-size: 0.26rem;
          color: #333333;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
      }
    }
    .fllow-detail {
      position: relative;
      display: flex;
      &::before {
        content: '';
        display: block;
        position: absolute;
        width: 100%;
        top: 0;
        height: 1px;
        border-top: 1px solid #d2d2d2;
        color: #d2d2d2;
        transform-origin: 0 100%;
        transform: scaleY(0.5);
      }
      &::after {
        content: '';
        display: block;
        position: absolute;
        width: 100%;
        bottom: 0;
        height: 1px;
        border-bottom: 1px solid #d2d2d2;
        color: #d2d2d2;
        transform-origin: 0 100%;
        transform: scaleY(0.5);
      }
      li {
        position: relative;
        flex: 1;
        height: 0.8rem;
        line-height: 0.8rem;
        font-size: 0.28rem;
        color: #666666;
        text-align: center;
        &::after {
          content: '';
          display: block;
          position: absolute;
          top: 0;
          right: 0;
          width: 1px;
          height: 0.8rem;
          background: #D2D2D2;
          transform: scaleX(0.5);
        }
        &:last-child::after {
          display: none;
        }
        span {
          color: #D44743;
        }
        .fllow-btn {
          display: inline-block;
          padding: 0 0.4rem;
          height: 0.6rem;
          line-height: 0.6rem;
          font-size: 0.3rem;
          color: #ffffff;
          background: #D44743;
          border-radius: 0.06rem;
        }
      }
    }
  }
</style>
